package com.hbnu.exercise.work;

import java.util.Scanner;

public class CheckLogin
{
    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        String account = "1370826143";
        String password = "123456";
        String tempAccount;
        String tempPassword;
        for (int i = 2; i >= 0; i--)
        {
            tempAccount = scanner.next();
            tempPassword = scanner.next();
            if (account.equals(tempAccount) && password.equals(tempPassword))
            {
                System.out.println("登录成功");
                break;
            }
            if (i != 0)
                System.out.println("登录失败，你还有" + i + "次机会");
            else
                System.out.println("登录失败，已没有机会");
        }
    }
}
